/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package pojo;

import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 *
 * @author pvhuy
 */
@Entity
@Table(name=TinhTrangDonHang.TABLE_TINHTRANGDONHANG)
public class TinhTrangDonHang extends Base{
    public static final String TABLE_TINHTRANGDONHANG = "TinhTrangDonHang";

    protected static final String COLUMN_TENTINHTRANG = "TenTinhTrang";
    private static final int LENGTH_TENTINHTRANG = 45;
    @Column(name=COLUMN_TENTINHTRANG, length=LENGTH_TENTINHTRANG, nullable=false)
    private String tenTinhTrang;

    @OneToMany(mappedBy="tinhTrang", cascade=CascadeType.ALL)
    private List<DonDatHang> danhSachDonDatHang;


    /**
     * @return the tenTinhTrang
     */
    public String getTenTinhTrang() {
        return tenTinhTrang;
    }

    /**
     * @param tenTinhTrang the tenTinhTrang to set
     */
    public void setTenTinhTrang(String tenTinhTrang) {
        this.tenTinhTrang = tenTinhTrang;
    }

    /**
     * @return the danhSachDonDatHang
     */
    public List<DonDatHang> getDanhSachDonDatHang() {
        return danhSachDonDatHang;
    }

    /**
     * @param danhSachDonDatHang the danhSachDonDatHang to set
     */
    public void setDanhSachDonDatHang(List<DonDatHang> danhSachDonDatHang) {
        this.danhSachDonDatHang = danhSachDonDatHang;
    }
}
